package edu.sctu.practice.class02.yangyuran.assign02;

/**
 * Created by Administrator on 2015/10/8.
 */
public class Circle {
    private double radius;
    public double pi = 3.14;
    static int numOfObjects = 0;

    //返回半径值的方法
    public double getRadius() {
        return radius;
    }

    //返回面积的方法
    public double getArea() {
        double area;
        return area = pi * radius * radius;
    }

    public Circle(double radius) {
        this.radius = radius;
        numOfObjects++;
    }

}

